package org.lmw.mm.interceptor;

import com.jfinal.aop.Interceptor;
import com.jfinal.core.ActionInvocation;
import com.jfinal.core.Controller;

public class LoginInterceptor implements Interceptor{

	public void intercept(ActionInvocation ai) {
		 Controller ctrl = ai.getController();
		if(ctrl.getSessionAttr("sessionUser")!=null){
			 ai.invoke();
		}else{
			 ctrl.render("/comm/login.html");
		}
	}
}
